package com.zsk.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("验证码实体")
@TableName("shop_verification_code")
public class VerificationCode implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("自增主键")
    private Long id;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("验证类型@EnumVerificationType")
    private Integer type;

    @ApiModelProperty("验证码")
    private String code;

    @ApiModelProperty("失效时间")
    private Date invalidTime;

    @ApiModelProperty("是否已校验")
    private Boolean used;

    @ApiModelProperty("使用时间")
    private Date useTime;

    @ApiModelProperty("生成时间")
    private Date createTime;

    private static final long serialVersionUID = 1L;

}